/**
 * 05/12/2013
 * 
 * Splash
 * 
 * Copyright GPL
 */
package com.jtmproject.javiertejedor.activities;

import com.jtmproject.javiertejedor.R;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ImageView;

/**
 * This is the entry's class
 * @author Javier Tejedor
 */
public class Splash extends Activity implements OnClickListener {
	
	private ImageView imgEntry;
	private Button btnEntry;

	/* (non-Javadoc)
	 * @see android.app.Activity#onCreate(android.os.Bundle)
	 */
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_splash);
		
		imgEntry = (ImageView) findViewById(R.id.img_entry);
		imgEntry.setOnClickListener(this);
		
		btnEntry = (Button) findViewById(R.id.btn_entry);
		btnEntry.setOnClickListener(this);
	}


	/* (non-Javadoc)
	 * @see android.view.View.OnClickListener#onClick(android.view.View)
	 */ 
	@Override
	public void onClick(View arg0) {
		launchMenuActivity();
	}


	/**
	 * This launches the menu activity
	 */
	private void launchMenuActivity() {
		startActivity(new Intent(this, MainMenu.class));
		this.finish();
	}
	
}
